
const xhr = new XMLHttpRequest();

xhr.open('POST','/api/users/login',true);

xhr.onreadystatechange = function(){
    const res = xhr.responseText;
    console.log(res);
}
xhr.setRequestHeader('content-type','application/json')
xhr.send('{"username":"admin","password":"123456"}');